home *** CD-ROM | disk | FTP | other *** search
- global gWordList, gwordlist2, gtiles, gcols, wholelist, wholelist2, lilnum, cover, heylo
-
- on createPuzzle
- currentcount = 1
- wholelist = [:]
- repeat with i = 1 to gWordList[#across].count
- if ilk(gWordList[#across][i], #propList) then
- ass = fuckword(currentcount, gWordList[#across][i].wrd, i, getline(gWordList[#across][i].nbr))
- lilnum[1].member.text = gWordList[#across][i].nbr.string
- lilnum[1].loc = point(gtiles[currentcount].left, gtiles[currentcount].top)
- lilnum.deleteAt(1)
- currentcount = ass
- next repeat
- end if
- if gWordList[#across][i] = #blackbox then
- gtiles[currentcount].member = member("blackbox")
- currentcount = currentcount + 1
- end if
- end repeat
- wholelist2 = [:]
- whipit()
- cover.visible = 0
- end
-
- on whipit
- repeat with i = 1 to gwordlist2.count
- ogd = the itemDelimiter
- the itemDelimiter = "-"
- arowcounta = gwordlist2[i].pos.item[1].value
- acolcounta = gwordlist2[i].pos.item[2].value
- the itemDelimiter = ogd
- startposinc = (arowcounta * 15) - 15
- startpos = acolcounta + startposinc
- lilnum[1].member.text = string(gwordlist2[i].nbr)
- lilnum[1].loc = point(gtiles[startpos].left.float, gtiles[startpos].top.float)
- lilnum.deleteAt(1)
- fuckitnow(startpos, gwordlist2[i].wrd, i)
- end repeat
- end
-
- on fuckitnow st, wo, thei
- xS = 0
- repeat with q = 1 to wo.char.count
- ass = (q - 1) * 15
- if (st + ass) > gtiles.count then
- exit repeat
- end if
- gtiles[st + ass].ptilelist2 = []
- repeat with you = 1 to wo.char.count
- ade = (you - 1) * 15
- if (st + ade) > gtiles.count then
- exit repeat
- end if
- gtiles[st + ass].ptilelist2.add(gtiles[st + ade])
- end repeat
- xS = xS + 15
- end repeat
- wholelist2.addProp(gwordlist2[thei].nbr.string, gtiles[st].ptilelist2)
- end
-
- on massacre
- sweet = []
- repeat with o = 1 to 15
- ass = o
- repeat while ass < gtiles.count
- sweet.add(gtiles[ass])
- ass = ass + 15
- end repeat
- end repeat
- return sweet
- end
-
- on findDown anum
- repeat with shez = 1 to gWordList[#down].count
- if gWordList[#down][shez].nbr = anum then
- return shez
- end if
- end repeat
- return VOID
- end
-
- on gameEnd winornot
- s = the ticks + 25
- repeat while the ticks < s
- updateStage()
- end repeat
- heylo = winornot
- go("game over")
- end
-
- on fuckword arg1, arg2, arg3, theques
- xS = 0
- repeat with q = 1 to arg2.char.count
- gtiles[arg1 + xS].pchar = arg2.char[q]
- gtiles[arg1 + xS].ptilelist = []
- gtiles[arg1 + xS].myques = theques
- repeat with you = arg1 to arg1 + arg2.char.count - 1
- if you > gtiles.count then
- exit repeat
- end if
- gtiles[arg1 + xS].ptilelist.add(gtiles[you])
- end repeat
- xS = xS + 1
- end repeat
- wholelist.addProp(gWordList[#across][arg3].nbr.string, gtiles[arg1].ptilelist)
- return arg1 + arg2.char.count
- end
-
- on getline arg
- ogDelim = the itemDelimiter
- the itemDelimiter = "."
- repeat with yi = 1 to member("across questions").line.count
- if member("across questions").line[yi].item[1] = arg then
- return yi
- end if
- end repeat
- the itemDelimiter = ogDelim
- end
-